from flask import Flask, render_template, request

app = Flask(__name__)


@app.route('/', methods=['GET', 'POST'])  # 首页
def index():
	return render_template('index.html')


@app.route('/res', methods=['GET', 'POST'])  # 信息页
def res():
	name = request.form.get("name")
	person = {
		'result': '匹配失败',
		'info': name, }

	print("提交的信息: ", name)
	if str(name) == "刘某":
		person = {
			'result': '真帅',
			'info': name, }
	return render_template('res.html', person=person)


if __name__ == '__main__':
	app.run(port=9010)
